#pragma once

#include "TextureProg.h"


class QOpenGLFunctions_3_3_Core;
class QOpenGLShaderProgram;
class QOpenGLVertexArrayObject;
class Camera;
class QOpenGLTexture;


class TextureCubeProg : public TextureProg
{
    Q_OBJECT
public:
    explicit TextureCubeProg(QObject *parent = nullptr);
    virtual ~TextureCubeProg();

    virtual void initializeGL(QOpenGLContext* ctx, void* arg, size_t argLen);
    virtual void paintGL(const Camera& camera, const QMatrix4x4& projection, const Light& light);

signals:

public slots:
    virtual void teardownGL();

private:
    QOpenGLFunctions_3_3_Core*  MY_GL_FUNC;

    QOpenGLShaderProgram*       program;
    QOpenGLVertexArrayObject*   vao;
    QOpenGLBuffer*              vbo;
    QOpenGLTexture*             diffuseMap;
    QOpenGLTexture*             specularMap;

    int                         modelLoc;
    int                         viewLoc;
    int                         projectionLoc;
    int                         viewPosLoc;
};
